import dayjs from 'dayjs'
import 'dayjs/locale/zh-cn'
var relativeTime = require('dayjs/plugin/relativeTime')
export function fromNowFun(time) {
    // 相对时间
    dayjs.extend(relativeTime)
    // 转成中文
    dayjs.locale('zh-cn')
    const date = new Date(time)
    return dayjs(date).fromNow()
}
